Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU][ARM]: Implemented CPU plugin just-in-time emitter for Negative operation #28258

Merged
merged 13 commits into from
Jan 8, 2025

Conversation

xyz-harshal
Copy link
Contributor

Details:

  • Added JIT emitter for Eltwise Negation operation on ARM64 SIMD
  • Implemented fp32 optimization replacing C++ Math implementation
  • Modified ARM64 executor to support new JIT emitter
  • Updated kernel files to include Negation in Eltwise operations
  • Added test coverage for JIT implementation verification
  • Transitioned operation type from Math to Eltwise for better performance

Tickets:

image

@xyz-harshal xyz-harshal requested review from a team as code owners January 2, 2025 21:02
@github-actions github-actions bot added the category: CPU OpenVINO CPU plugin label Jan 2, 2025
@sys-openvino-ci sys-openvino-ci added the ExternalPR External contributor label Jan 2, 2025
@xyz-harshal xyz-harshal closed this Jan 2, 2025
@xyz-harshal xyz-harshal reopened this Jan 3, 2025
@a-sidorova a-sidorova self-assigned this Jan 3, 2025
@a-sidorova a-sidorova added this to the 2025.0 milestone Jan 3, 2025
@a-sidorova a-sidorova added the platform: arm OpenVINO on ARM / ARM64 label Jan 3, 2025
@a-sidorova
Copy link
Contributor

build_jenkins

@a-sidorova
Copy link
Contributor

@xyz-harshal many x64 jobs are failed with the following error:

/__w/openvino/openvino/openvino/src/plugins/intel_cpu/src/nodes/eltwise.cpp:324:10:   required from here
/usr/include/c++/8/ext/new_allocator.h:136:4: error: no matching function for call to 'ov::intel_cpu::jit_negative_emitter::jit_negative_emitter(dnnl::impl::cpu::x64::jit_generator*&, dnnl::impl::cpu::x64::cpu_isa_t&, ov::element::Type&)'
  { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }

Could you please add the new constructor without const std::shared_ptr<ov::Node>& argument for jit_negative_emitter on x64 platforms here? It should fix the build on x64 devices.

@a-sidorova
Copy link
Contributor

build_jenkins

@a-sidorova
Copy link
Contributor

@xyz-harshal some of jobs in CI are red. Please, take a loot at them:

  1. Code style on x64 platforms. Please fix the error below:
src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp:2002:-jit_negative_emitter::jit_negative_emitter(x64::jit_generator* host, x64::cpu_isa_t host_isa, ov::element::Type exec_prc)
src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp:2002:+jit_negative_emitter::jit_negative_emitter(x64::jit_generator* host,
src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp:2003:+                                           x64::cpu_isa_t host_isa,
src/plugins/intel_cpu/src/emitters/plugin/x64/jit_eltwise_emitters.cpp:2004:+                                           ov::element::Type exec_prc)
  1. debian_10_arm. There are 12 failed tests with the same problem:
[ RUN      ] smoke_Activation5D_Eltwise_CPU/ActivationLayerCPUTest.CompareWithRefs/Negative_TS=(2.4.3.4.1)_AS=()_ConstantsValue=()_netPRC=f32_inPRC=f32_outPRC=f32__inFmts=ncdhw_outFmts=ncdhw_enforceSnippets=0
MEM_USAGE=172592KB
../../../../../../../repos/openvino/src/plugins/intel_cpu/tests/functional/utils/cpu_test_utils.cpp:221: Failure
Value of: primTypeCheck(primType)
Actual: false
Expected: true
primType is unexpected : ref_f32 Expected : acl_f32
[  FAILED  ] smoke_Activation5D_Eltwise_CPU/ActivationLayerCPUTest.CompareWithRefs/Negative_TS=(2.4.3.4.1)_AS=()_ConstantsValue=()_netPRC=f32_inPRC=f32_outPRC=f32__inFmts=ncdhw_outFmts=ncdhw_enforceSnippets=0, where GetParam() = ({ ({}, { { 2, 4, 3, 4, 1 } }) }, {}, (11, {}), f32, f32, f32, ({ 10 }, { 10 }, {}, ""), false) (69 ms)

This job is on aarch32. On aarch32 we doesn't support JIT emitters. Also looks like ACL doesn't contain kernel for Negative op on aarch32.
Could you please add Nenative op to this condition? With these changes, on aarch64 we will expect primitive type jit_f32 and on aarch32 - ref_f32.

@a-sidorova
Copy link
Contributor

build_jenkins

Copy link
Contributor

@a-sidorova a-sidorova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xyz-harshal thank you for the one more contribution to OpenVINO! 👍🏼

@dmitry-gorokhov dmitry-gorokhov added this pull request to the merge queue Jan 8, 2025
Merged via the queue into openvinotoolkit:master with commit b13ea4b Jan 8, 2025
182 checks passed
MirceaDan99 pushed a commit to MirceaDan99/openvino that referenced this pull request Jan 22, 2025
…operation (openvinotoolkit#28258)

### Details:
 - Added JIT emitter for Eltwise Negation operation on ARM64 SIMD
 - Implemented fp32 optimization replacing C++ Math implementation
 - Modified ARM64 executor to support new JIT emitter
 - Updated kernel files to include Negation in Eltwise operations
 - Added test coverage for JIT implementation verification
- Transitioned operation type from Math to Eltwise for better
performance

### Tickets:
 - openvinotoolkit#27500
 

![image](https://github.com/user-attachments/assets/2dd781da-94c7-4edc-abbb-e7a048d00944)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin ExternalPR External contributor platform: arm OpenVINO on ARM / ARM64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Good First Issue] [ARM]: Implement CPU plugin just-in-time emitter for Negative operation
4 participants